package com.neutech.service.impl;
import com.neutech.mapper.TdoctorMapper;
import com.neutech.service.TdoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public  class TdoctorServiceImpl implements TdoctorService {
    @Autowired
    private TdoctorMapper tdoctorMapper;
    @Override
    public List<Map<String, Object>> queryTdoctor() {
        List<Map<String, Object>> list = tdoctorMapper.queryTdoctorList(0);
        return list;
    }
    @Override
    public void insertTdoctor(Map map){
        Integer a = tdoctorMapper.addTdoctor(map);

    }
    public void updataTdoctor(Map map){
        tdoctorMapper.updataTdoctorById(map);
    }
    @Override
    public void deleteTdoctor(Map map){
        // tdoctorMapper.delTdoctorById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer tid= Integer.valueOf(map.get("tid").toString());
        tdoctorMapper.delTdoctorById(tid);
    }
}
